//
//$Id: adjacent.h 679 2011-03-12 16:50:06Z andrew.tsyganov $
#pragma once

#include "sets.h"
#include "types.h"
#include <map>

static const Subset kEmptyDst;

class Adjacent: public std::map<u_t, Subset>
{
public:
	u_t insert(u_t const sym_id, u_t const dst_id);
	u_t insert(u_t const sym_id, Subset const& s);
	u_t remove(u_t const sym_id, u_t const dst_id);
	u_t remove();

	bool contains(u_t const sym_id) const { return find(sym_id) != (*this).end(); }
	bool contains(u_t const sym_id, u_t const dst_id) const;
	
	u_t calc_Out_Transitions_Num() const;
	u_t calc_Out_Transitions_Num(u_t const sym_id) const;
	u_t calc_In_Transitions_Num(u_t const dst_id) const;
	u_t calc_In_Transitions_Num(u_t const dst_id, u_t const sym_id) const;
	
	Subset const& get_Dst(u_t const sym_id) const;
};

//EOF!
